\(\int \sec (c+d x) (a+a \sin (c+d x)) \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 17 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \log (1-\sin (c+d x))}{d} \]

[Out]

-a*ln(1-sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2746, 31} \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \log (1-\sin (c+d x))}{d} \]

[In]

Int[Sec[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Log[1 - Sin[c + d*x]])/d)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps \begin{align*} \text {integral}& = \frac {a \text {Subst}\left (\int \frac {1}{a-x} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {a \log (1-\sin (c+d x))}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.53 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \text {arctanh}(\sin (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d} \]

[In]

Integrate[Sec[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.94

method result size
derivativedivides \(-\frac {a \ln \left (\sin \left (d x +c \right )-1\right )}{d}\) \(16\)
default \(-\frac {a \ln \left (\sin \left (d x +c \right )-1\right )}{d}\) \(16\)
parallelrisch \(\frac {a \left (\ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )\right )}{d}\) \(33\)
risch \(i a x +\frac {2 i a c}{d}-\frac {2 a \ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )}{d}\) \(34\)
norman \(\frac {a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) \(39\)

[In]

int(sec(d*x+c)*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*a*ln(sin(d*x+c)-1)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \log \left (-\sin \left (d x + c\right ) + 1\right )}{d} \]

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-a*log(-sin(d*x + c) + 1)/d

Sympy [F]

\[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sec {\left (c + d x \right )}\, dx\right ) \]

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(sin(c + d*x)*sec(c + d*x), x) + Integral(sec(c + d*x), x))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \log \left (\sin \left (d x + c\right ) - 1\right )}{d} \]

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-a*log(sin(d*x + c) - 1)/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (17) = 34\).

Time = 0.30 (sec) , antiderivative size = 37, normalized size of antiderivative = 2.18 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 2 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{d} \]

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

(a*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 2*a*log(abs(tan(1/2*d*x + 1/2*c) - 1)))/d

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \sec (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{d} \]

[In]

int((a + a*sin(c + d*x))/cos(c + d*x),x)

[Out]

-(a*log(sin(c + d*x) - 1))/d